package com.pizzashop.abs.factory;

import com.pizzashop.abs.ingredient.ChicagoPizzaIngredientFactory;
import com.pizzashop.abs.ingredient.PizzaIngredientFactory;

public class ChicagoPizzaStore extends PizzaStore {

	@Override
	Pizza createPizza(String type) {
		Pizza pizza = null;
		PizzaIngredientFactory pizzaIngredientFactory = new ChicagoPizzaIngredientFactory();

		if (type.equals("cheese")) {
			pizza = new CheesePizza(pizzaIngredientFactory);
			pizza.setName("Chicago Style Cheese Pizza");
		} else if (type.equals("pepperoni")) {
			pizza = new PepperoniPizza(pizzaIngredientFactory);
			pizza.setName("Chicago Style Pepperoni Pizza");
		} else if (type.equals("clam")) {
			pizza = new ClamPizza(pizzaIngredientFactory);
			pizza.setName("Chicago Style Clam Pizza");
		} else if (type.equals("veggie")) {
			pizza = new VeggiePizza(pizzaIngredientFactory);
			pizza.setName("Chicago Style Veggie Pizza");
		}
		return pizza;
	}

}
